<template>
  <div class="container">
    <van-nav-bar
        title="预约会议室"
        left-text="返回"
        left-arrow
        @click-left="backPrePage"
    />

    <div class="already-meet">
      <van-card @click="toClaimPage(index)" class="my-card-font" v-for="(item,index) in cardData" :key="index"
                :desc="item.desc"
                :title="item.title"
                :thumb="item.thumb"
      />
    </div>
  </div>
</template>

<script>
import SelectMultiple from "../../components/SelectMultiple";
import VanFieldCheckbox from "../../components/VanFieldCheckbox";
import Util from "../../utils/utils";

export default {
  name: "MeetMain",

  components: {SelectMultiple, VanFieldCheckbox},
  data() {
    return {
      cardData: [
        {
          "id": 1,
          title: "发起会议",
          desc: "创建一个会议",
          thumb: require('@/assets/images/1.png'),
        },
        {
          "id": 2,
          title: "会议历史",
          desc: "以前参会列表",
          thumb: require('@/assets/images/2.png'),
        },
        {
          "id": 3,
          title: "待参会议",
          desc: "正准备参加的会议",
          thumb: require('@/assets/images/3.jpg'),
        }
      ],
      meetData: {
        meetTitle: '', //会议主题
        dateValue: '',
        timeArray: [],//会议时间
        meetType: '1',//会议类型
        manArray: [],// 选中参会人员集合
        meetPlace: '',  //会议地点
        address: '',//联系方式
        meetSummary: '', //会议概要
      },
    }
  },
  methods: {
    toClaimPage(index) {
      console.log(index)
      if (index === 0) {
        this.$router.push({path: '/meet/meetMain', query: {id: index}})
      }
      if (index === 1 ||index === 2) {
        this.$router.push({path: '/meet/meetHistory', query: {id: index}})
      }
    },

    backPrePage() {
      this.$router.go(-1);
    },
    myReserve() {
      this.$router.push('/meet/MeetReserve')
    },
  }
}
</script>

<style lang="less" scoped>
.container {
  height: 100vh;
  width: 100vw;
  background-color: #f4f4f4;
}

.already-meet {
  margin-top: 20%;
  padding-left: 2%;
  padding-right: 2%;
  border-radius: 2%;
}

/deep/ .van-card {
  margin-bottom: 9%;
  line-height: 0px;
}

/deep/ .van-card__desc {
  padding-left: 19%;
}

.img-already {
  height: 70px;
  padding-left: 7%;
}

/deep/ .van-card__title {

  max-height: 60px;
  font-weight: 500;
  line-height: 37px;
  font-size: 20px;
  padding-top: 11%;
  padding-left: 19%;
}
</style>
